package com.minarto.display {
	import scaleform.clik.controls.Window;
	import com.minarto.events.KeyEvtObj;
	import com.minarto.core.Bridge;
	import com.minarto.display.documentInit;

	/**
	 * @author KIMMINHWAN
	 */
	public class UIWindow extends Window {
		private var _key:KeyEvtObj,
					_mode:int = - 1,
					_tab:int = - 1;
		
		
		
		
		public function setMode($mode:int):void {
			if(_mode == $mode)	return;
			_mode = $mode;
		}
		public function getMode():int {
			return	_mode;
		}
		
		public function setTab($tab:int):void {
			if(_tab == $tab)	return;
			_tab = $tab;
		}
		public function getTab():int {
			return	_tab;
		}
		
		
		public function getKey():KeyEvtObj{
			return	_key;
		}
		public function setKey($key:KeyEvtObj):void {
			_key = $key;
		}
		
		
		public function UIWindow() {
			super();
			documentInit(this);
		}
		
		public function destroy():void{
			
		}
		
		override public function set visible ($v:Boolean):void {
			super.visible = $v;
			if($v){
				Bridge.UI_OPEN(name, this);
			}
			else{
				Bridge.UI_CLOSE(name, this);
			}
		}
	}
}
